//
//  SceneSettingViewController.m
//  Yihubang
//
//  Created by xmy on 2016/11/25.
//  Copyright © 2016年 xmy. All rights reserved.
//

#import "SceneSettingViewController.h"
#import "ScenesSettingVCModel.h"
#import "DeterCollectionViewCell.h"
#import "ScenesGuideView.h"

#import "PlayAudioView.h"
@interface SceneSettingViewController ()
@property (weak  , nonatomic) IBOutlet UICollectionView * GeneralScenarioCollectionView;
@property (weak  , nonatomic) IBOutlet UICollectionView * scenesCollectionView;
@property (weak  , nonatomic) IBOutlet UILabel          * speechLabel;
@property (weak  , nonatomic) UIButton                  * callPolice;
@property (strong, nonatomic) PlayAudioView             * playAudioView;
@property (strong, nonatomic) ScenesSettingVCModel      *viewModel;
@property (strong, nonatomic) ScenesGuideView           *scenesGuideView;
@end

@implementation SceneSettingViewController
@synthesize viewModel = _viewModel;
@synthesize mTableView = _mTableView;
- (void)viewDidLoad {
    [super viewDidLoad];
     self.viewModel.title=@"选择场景";
    self.viewModel.dataSource = @[@[],@[@[@"爸爸",@"妈妈",@"朋友"]],@[@[@"夜路",@"电梯",@"独居"],@[@"夜间搭车",@"",@""]]];
    [self.viewModel bindTableView:_mTableView];
    
    // Do any additional setup after loading the view.
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:YES];
    [self.viewModel.stopCommend execute:nil];
}

- (ScenesSettingVCModel *)viewModel{
    if (_viewModel==nil) {
        _viewModel = [[ScenesSettingVCModel alloc] initWithViewController:self];
    }
    return _viewModel;
}
- (IBAction)callPolice:(id)sender {
   [self callPhonesActionSheet:@"110"];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
